var Thread = Java.type("java.lang.Thread");
var Runnable = Java.type("java.lang.Runnable");

function coverageTest(){


    var MyRun = Java.extend(Runnable)
    var run1 = new MyRun({
        run: function() {
            print("Run in separate thread");
        }
    })
    var th = new Thread(run1);
    th.start()

    var RunnableImpl = Java.extend(Runnable, {
        run: function() {
            print("Run in separate thread");
        }
    })

    var th = new Thread(new RunnableImpl);
    th.start()

    var flag = true;
    if(flag) {
        print(1)
    } else {
        print(2)
    }
}

function coverageTest2(){


    var MyRun = Java.extend(Runnable)
    var run1 = new MyRun({
        run: function() {
            print("Run in separate thread");
        }
    })
    var th = new Thread(run1);
    th.start()

    var RunnableImpl = Java.extend(Runnable, {
        run: function() {
            print("Run in separate thread");
        }
    })

    var th = new Thread(new RunnableImpl);
    th.start()

    var flag = 1;
    if(flag === 1) {
        print(1)
    } else if(flag ===2){
        print(2)
    } else {
        print(3)
    }
}